//
//  TGMItem.h
//  TravelGuideMdd
//
//  Created by BigPolarBear on 13-5-14.
//  Copyright (c) 2013年 mafengwo.com. All rights reserved.
//


#import <Foundation/Foundation.h>
#import "MFWJson.h"
#ifndef MFWSdkHeaders
//#import "MFWJson.h"
#endif

/*
 @attention 根据服务接口文档，生成属性及Key宏定义的Excel公式
 
 ="kDict"&L4&"_Key_"&I4
 ="#define "&M4&" @"""&I4&""""
 ="@property (nonatomic,readonly) NSString* "&I4&";"
 ="-(NSString*)"&I4&"{return [self objectForKey:"&M4&"];}"
 */


/** Model层Item的基类 */
@interface BaseItem : NSObject

/** 原始数据字典 */
@property (nonatomic,readonly) NSDictionary* originDict;
@property(nonatomic, readonly) MFWJson *json;

/** 通过字典初始化 */
-(id)initWithDictionary:(NSDictionary*)dict;
- (id)initWithJson:(MFWJson*)json;
/** 从字典数组转化 */
+(NSArray*)arrayWithArrayDictionary:(NSArray*)arrayDict;

/** 如果原始数据没有此key，则返回空字符串@"" */
-(NSString*)stringForKey:(NSString*)key;
-(MFWJson*)jsonForKey:(NSString*)key;

@end
